# Contributor: Vlad Glagolev <scm@vaygr.net>
# Maintainer: Vlad Glagolev <scm@vaygr.net>
pkgname=vile
pkgver=9.8y
pkgrel=0
pkgdesc="vi-like Emacs"
url="https://invisible-island.net/vile/"
arch="all"
license="GPL-2.0-only"
makedepends="flex ncurses-dev"
subpackages="$pkgname-doc"
source="https://invisible-island.net/archives/vile/current/vile-$pkgver.tgz"

build() {
	CFLAGS="$CFLAGS -D_GNU_SOURCE" \
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--disable-stripping \
		--enable-filters \
		--enable-plugins \
		--with-ncurses \
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install

	install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
}

sha512sums="
ce3c7178f6aecfd152e487d0053399739cf8880aa9c38283c9e4e7b95606fa2484f3cf9f7e797f538a47555be5257fbd34b112210e68a39d74f6b8ae7d968c32  vile-9.8y.tgz
"
